﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="bts_webapp.Search" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="scriptMan" runat="server" />
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSubmit">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Windows7" />

    <telerik:RadCodeBlock ID="cb" runat="server">
    <script language="javascript" type="text/javascript">
        function openWin(param) 
        {
            var oWnd = radopen(param, "RadWindow1");
            return true;
        }
    </script>

    </telerik:RadCodeBlock>
    <div>
        <div><h2><strong>Tìm kiếm</strong></h2></div>
        <div style="border-bottom: 2px solid; border-top:2px solid; width:50%; padding-bottom:5px;">
            <span style="font-style: italic;">Tìm theo</span>
            <asp:CheckBox Text="Trạm" runat="server" ID="chkStation" /> &nbsp;&nbsp;
            <asp:CheckBox Text="Thiết bị" runat="server" ID="chkDevice" /> &nbsp;&nbsp;
            <asp:CheckBox Text="Luồng" runat="server" ID="chkFlow" /> &nbsp;&nbsp;
            <br />
            <span style="font-style:italic;">Tên cần tìm</span>
            <telerik:RadTextBox ID="txtSearchContent" runat="server" Width="350px" Skin="Windows7" />&nbsp;&nbsp;
            <telerik:RadButton ID="btnSubmit" runat="server" Text="Tìm" Width="80px" Skin="Windows7" OnClick="btnSubmit_Click" />
        </div>
    </div>
    <div>
        <br />
        <div><asp:Label ID="lblResult" Text="Kết quả tìm kiếm" runat="server" /></div>
        <div>
            <telerik:RadGrid runat="server" Skin="Windows7" ID="RadGrid1" AutoGenerateColumns="false"
                AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemDataBound="RadGrid1_ItemDataBound">
                <MasterTableView>
                    <Columns>
                        <telerik:GridBoundColumn DataField="Id" HeaderText="Mã" UniqueName="Id" Visible="false" />
                        <telerik:GridBoundColumn DataField="Name" HeaderText="Tên" UniqueName="Name" />
                        <telerik:GridBoundColumn DataField="Type" HeaderText="Loại" UniqueName="Type" />
                    </Columns>
                   
                </MasterTableView>
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
            </telerik:RadGrid>
        </div>
        <div>
            <telerik:RadWindowManager ID="RadWindowManager1" VisibleStatusbar="false"
                ReloadOnShow="true" runat="server" Skin="Windows7" EnableShadow="false">
                <Windows>
                    <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" Width="800px"
                Height="350px" Title="Detail information" Behaviors="Default"
                        NavigateUrl="~/ObjectInfo.aspx">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
        </div>
    </div>

</asp:Content>
